<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/4/11
  Time: 19:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!--分页标签 -->
<%@ taglib prefix="page" uri="/xianzhiOA/pageTag" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <!-- Basic -->
    <meta charset="UTF-8"/>
    <title>home</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <link href="${pageContext.request.contextPath}/dist/backEnd/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="${pageContext.request.contextPath}/dist/backEnd/css/style.css" rel="stylesheet"/>
    <link href="${pageContext.request.contextPath}/dist/backEnd/css/skycons.css" rel="stylesheet"/>
    <link href="${pageContext.request.contextPath}/dist/backEnd/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="${pageContext.request.contextPath}/dist/backEnd/css/pace.preloader.css" rel="stylesheet"/>
    <link href="${pageContext.request.contextPath}/dist/backEnd/css/jquery.mmenu.css" rel="stylesheet"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/dist/backEnd/css/jeDate.css" type="text/css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/dist/backEnd/js/jeDate.js"></script>
    <script type="application/javascript"
            src="${pageContext.request.contextPath}/dist/backEnd/js/jquery-2.1.1.min.js"></script>
    <script type="application/javascript">
        function pToSub(page) {
            if (page != undefined) {
                var pageInp = document.getElementById("thePage");
                pageInp.value = page;
                var form = document.getElementById("personForm");
                form.submit();
            }
        }
        //         添加的单击事件（跳到添加页面的功能）
        function ToAddEmpPage() {
            var empForm = document.getElementById("empForm");
            empForm.action = "${pageContext.request.contextPath}/XzEmp/ToAddEmpPage.emp";
        }
        function deleteCheck(personId) {
            if (confirm("确定要删除吗")) {
                var empForm = document.getElementById("empForm");
                window.location.href = "${pageContext.request.contextPath}/Person/deletePerson.emp?personId=" + personId;
            } else {
            }
        }
    </script>
</head>
<body>
<!--头部开始-->
<jsp:include page="headerBack.jsp"/>
<!-- 导航 -->
<jsp:include page="leftBack.jsp"/>
<!--内容页-->
<div class="main">
    <!--内容页头部-->
    <div class="page-header">
        <div class="pull-left">
            <ol class="breadcrumb visible-sm visible-md visible-lg">
                <li><a href="two.html"><i class="icon fa fa-home"></i>主页</a></li>
                <li class="active"><i class="fa fa-pencil"></i>基本信息</li>
            </ol>
        </div>
        <div class="pull-right">
            <h2>主页</h2>
        </div>
    </div>
    <form action="${pageContext.request.contextPath}/Person/selPersonAll.emp" class="search1" id="personForm" method="post">
        <div>
            <div>
                <%--<button type="submit" class="two btn btn-primary" style="float: left"  onclick="ToAddEmpPage()">添加</button>--%>
                <a href="${pageContext.request.contextPath}/Person/editPerson.emp" class="three btn btn-primary">添加</a>
            </div>
            <div style="margin-top: 10px">
                <input id="thePage" type="hidden" name="page" value="${page}">
                <input name="isAll" value="all" type="hidden" >
                <div class="col-md-12">
                <input type="text" placeholder="姓名..." name="personName" value="${person.personName}" class="col-md-3" style="margin-right: 20px">
                <input type="text" placeholder="负责人..." name="empName" value="${person.empName}" class="col-md-3" style="margin-right: 20px">
                <input type="text" placeholder="电话..." name="personTel" value="${person.personTel}" class="col-md-3" style="margin-right: 20px">
                <input type="text" placeholder="开始时间..." name="begin" value="<fmt:formatDate value="${begin}" type="both"
                                            pattern="yyyy-MM-dd HH:mm:dd"/>" class="col-md-3" id="dateinfo" readonly></div>

                <div class="col-md-12">
                <select name="personRecord" class="col-md-2" style="margin-right: 20px">
                    <option selected="selected" value="">阶段</option>
                    <option <c:if test="${person.personRecord=='1'}"> selected="selected"</c:if> value="1">没来</option>
                    <option <c:if test="${person.personRecord=='2'}"> selected="selected"</c:if> value="2">待定</option>
                    <option <c:if test="${person.personRecord=='3'}"> selected="selected"</c:if> value="3">pass</option>
                    <option <c:if test="${person.personRecord=='4'}"> selected="selected"</c:if> value="4">关闭</option>
                </select>
                <select name="personAudit" class="col-md-2" style="margin-right: 20px">
                    <option selected="selected" value="">等级</option>
                    <option value="A" <c:if test="${person.personAudit=='A'}">selected="selected"</c:if>>A</option>
                    <option value="B" <c:if test="${person.personAudit=='B'}">selected="selected"</c:if>>B</option>
                    <option value="C" <c:if test="${person.personAudit=='C'}">selected="selected"</c:if>>C</option>
                </select>
                <select name="personReception" class="col-md-2" style="margin-right: 20px">
                    <option selected="selected" value="">颜值</option>
                    <option <c:if test="${person.personReception=='1'}"> selected="selected" </c:if> value="1">合格</option>
                    <option <c:if test="${person.personReception=='2'}"> selected="selected" </c:if> value="2">不合格</option>
                </select>
                <input type="text" placeholder="结束时间..." name="end" value="<fmt:formatDate value="${end}" type="both"
                                            pattern="yyyy-MM-dd HH:mm:dd"/>" class="col-md-3" id="dateinfo2" readonly style="margin-right: 20px">
                    <button type="submit" class="one"><span class="fa fa-search"></span></button></div>
            </div>
            <div style="clear: both"></div>
        </div>
        <!--表格-->
        <div class="well">
            <table class="table" id="now">
                <thead>
                <tr>
                    <th class="vv">颜值</th>
                    <th class="vv">姓名</th>
                    <th class="vv">负责人</th>
                    <th class="vv">电话</th>
                    <th class="vv">等级</th>
                    <th class="vv">性别</th>
                    <th class="vvv">面试日期</th>
                    <th class="vvv">应聘职位</th>
                    <th class="vv">学历</th>
                    <th class="vvv">工作经验</th>
                    <th class="vvv">生日</th>
                    <th class="vvv">评价日期</th>
                    <th class="v0">简历</th>
                    <th class="v0">修改</th>
                    <th class="v0">删除</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="p" items="${personList}">
                    <tr>
                        <td>
                            <c:choose>
                                <c:when test="${p.personReception==2}">
                                    不合格
                                </c:when>
                                <c:when test="${p.personReception==1}">
                                    合格
                                </c:when>
                            </c:choose>
                        </td>
                        <td>${p.personName}</td>
                        <td>${p.empName}</td>
                        <td>${p.personTel}</td>
                        <td>${p.personAudit}</td>
                        <td>${p.personSex}</td>
                        <td><fmt:formatDate value="${p.interviewTime}" type="both"
                                            pattern="yyyy年MM月dd日 HH:mm:ss"/></td>
                        <td>${p.personJob}</td>
                        <td>${p.personEducation}</td>
                        <td>${p.personExp}</td>
                        <td>${p.personBirth}</td>
                        <td><fmt:formatDate value="${p.commentTime}" type="both"
                                            pattern="yyyy年MM月dd日 HH:mm:ss"/></td>
                        <td>
                            <a href="${pageContext.request.contextPath}/resumeUpload/${p.personResume}"
                               role="button" data-toggle="modal"><i class="fa fa-flag"></i></a></td>
                        <td><a href="${pageContext.request.contextPath}/Person/editPerson.emp?pid=${p.personId}"><i
                                class="fa fa-pencil"></i></a></td>
                        <td><a onclick="deleteCheck(${p.personId})" role="button" data-toggle="modal"><i
                                class="fa fa-times"></i></a></td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
        <!--分页符-->
        <div style="float: right">
            <ul class="pagination">
                <page:paging length="10" page="${page}" pages="${pages}"/>
            </ul>
        </div>
    </form>
</div>
<script type="text/javascript">
    jeDate({
        dateCell:"#dateinfo",
        isinitVal:false,
        isTime:true,
        minDate:"2014-09-19 00:00:00"
    })
    jeDate({
        dateCell:"#dateinfo2",
        isinitVal:false,
        isTime:true,
        minDate:"2014-09-19 00:00:00"
    })
</script>
</body>
</html>
